atspi: Add some docs
authorMatthias Clasen <mclasen@redhat.com>
Thu, 15 Oct 2020 01:02:02 +0000 (21:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 15 Oct 2020 01:04:25 +0000 (21:04 -0400)
Add a comment that explains a few of the more subtle
points of the Atspi context tree contstruction.

gtk/a11y/gtkatspicontext.c

index 40c655f04a6a4114c888c777bdc1a91bf679494d..36f463686272f5c6593017812fccbe3daf1d9071 100644 (file)
 # include <gdk/x11/gdkx11property.h>
 #endif
 
+/* We create a GtkAtSpiContext object for (almost) every widget.
+ *
+ * Each context implements a number of Atspi interfaces on a D-Bus
+ * object. The context objects are connected into a tree by the
+ * Parent property and GetChildAtIndex method of the Accessible
+ * interface.
+ *
+ * The tree is an almost perfect mirror image of the widget tree,
+ * with a few notable exceptions:
+ *
+ * - We don't create contexts for the GtkText widgets inside
+ *   entry wrappers, since the Text functionality is represented
+ *   on the entry contexts.
+ *
+ * - We insert non-widget backed context objects for each page
+ *   of a stack. The main purpose of these extra context is to
+ *   hold the TAB_PANEL role and be the target of the CONTROLS
+ *   relation with their corresponding tabs (in the stack
+ *   switcher or notebook).
+ */
+
 struct _GtkAtSpiContext
 {
   GtkATContext parent_instance;